var html = '<nav class="mui-bar mui-bar-tab footBox">' + 
		    '<a href="index2.html" class="mui-tab-item">' + 
		        '<img  src="phoneContent/img/foot1.png" >' + 
		        '<span class="c">首页</span>' + 
		    '</a>' + 
		    '<a href="Team.html" class="mui-tab-item">' + 
		        '<img  src="phoneContent/img/foot2.png" >' + 
		        '<span class="c">团队</span>' +
		    '</a>' + 
		    '<a href="memberCenter.html" class="mui-tab-item">' + 
		        '<img  src="phoneContent/img/foot3.png" >' + 
		        '<span class="c">个人中心</span>' +
		    '</a>' + 
		'</nav>';
$(function(){
	searchGoods();
	$("body").append(html);
	let index = $(".tabShow").val(); // 页面隐藏input
	$("nav a").eq(index).addClass("mui-active");
	$("nav a").eq(index).find("img").attr("src", 'phoneContent/img/foot0' + (parseInt(index)+1) + '.png');
	$("nav").on("tap", "a", function() { //点击触发
		location.href = $(this).attr("href");
	})
})

function searchGoods(){
	$(".searchBtn").on("click",function(){
		var c = $(this).parent().find(".searchInput").val();
		if(!c){
			mui.toast("请输入搜索内容！");
			return;
		}
		location.href = 'goodsList.html?goodName=' + c;
	});
}
